function generateUniqueId() {
  return `v1-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;
}

let uuid = "";
export function getUUID() {
  if (uuid) return uuid;

  uuid = localStorage.getItem("uuid");
  if (uuid) return uuid;

  uuid = generateUniqueId();
  localStorage.setItem("uuid", uuid);
  return uuid;
}
